﻿using System;
using System.Net;
using ScheduleMVVM.Model.RuntimeFramework;

namespace ScheduleMVVM.Model.PersistentFramework
{
    [System.Xml.Serialization.XmlInclude(typeof(TUTUruEngine))]
    public abstract class BaseEngine
    {
        public String Title
        { get; set; }
        public String Website
        { get; set; }
        public String ClassName
        { get; set; }
        public String StationsStore
        { get; set; }
        public String FavouritesStore
        { get; set; }
        /// <summary>
        /// Gets the web address of the document
        /// </summary>
        public abstract String GetQueryString(StationEntry StartStation, StationEntry EndStation);
        /// <summary>
        /// Parses the Html document and stores the results in a List
        /// </summary>
        /// <param name="htmlDocument">Must be a non-null HtmlDocument</param>
        /// <param name="resultArray">Must be initialized</param>
        public abstract ScheduleParseResult GetEntriesFromHtmlDocument(String htmlDocument, System.Collections.Generic.List<DataItem> resultList,out Exception error,out ErrorCause cause);
    }
    public enum ScheduleParseResult
    {
        COMPLETE,
        ERRORS,
        FAILURE,
        NO_TRANSITION
    }
}
